-
-
Notifications
You must be signed in to change notification settings - Fork 34
🐛 handle curtime()
, curdate()
, current_timestamp()
, and now()
MariaDB-specific translations in default values
#100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…iaDB specific translations in default values
…translations in default values
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant MySQLtoSQLite
participant MySQL Column Definition
participant SQLite Column Definition
MySQL Column Definition->>MySQLtoSQLite: Provide default value (e.g., "curtime()", "current_timestamp()")
MySQLtoSQLite->>MySQLtoSQLite: _translate_default_from_mysql_to_sqlite
MySQLtoSQLite->>SQLite Column Definition: Output mapped SQLite default (e.g., DEFAULT CURRENT_TIME)
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (17)
🔇 Additional comments (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
curtime()
, curdate()
, current_timestamp()
and now()
MariaDB specific translations in default values
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #100 +/- ##
==========================================
+ Coverage 94.34% 94.40% +0.05%
==========================================
Files 8 8
Lines 637 643 +6
==========================================
+ Hits 601 607 +6
Misses 36 36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
curtime()
, curdate()
, current_timestamp()
and now()
MariaDB specific translations in default valuescurtime()
, curdate()
, current_timestamp()
, and now()
MariaDB specific translations in default values
curtime()
, curdate()
, current_timestamp()
, and now()
MariaDB specific translations in default valuescurtime()
, curdate()
, current_timestamp()
, and now()
MariaDB-specific translations in default values
curtime()
, curdate()
, current_timestamp()
, and now()
MariaDB-specific translations in default valuescurtime()
, curdate()
, current_timestamp()
, and now()
MariaDB-specific translations in default values
Testet localy and its working |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know if I have permissions to approve
Thanx for confirming. |
This pull request enhances the translation of MariaDB-specific default values to SQLite equivalents by adding support for more MySQL functions and updating the corresponding unit tests to ensure correctness.
Enhancements to MariaDB-to-SQLite translation:
curtime()
,curdate()
,current_timestamp()
, andnow()
to their SQLite equivalents (CURRENT_TIME
,CURRENT_DATE
, andCURRENT_TIMESTAMP
) in the_translate_default_from_mysql_to_sqlite
method ofsrc/mysql_to_sqlite3/transporter.py
.Unit test updates:
test_translate_type_from_mysql_to_sqlite_all_valid_columns
method intests/unit/mysql_to_sqlite3_test.py
to include test cases forcurtime()
,curdate()
,current_timestamp()
, andnow()
to validate the new translations. [1] [2]Fixes #99